﻿//      *********    NON MODIFICARE QUESTO FILE     *********
//      Il file viene rigenerato da uno strumento di progettazione. Se si apportano
//      modifiche al file, possono verificarsi errori.
namespace Blend.SampleData.SampleDataSource
{
	using System; 
	using System.ComponentModel;

// Per ridurre notevolmente il footprint dei dati di esempio nell'applicazione di produzione, è possibile impostare
// la costante di compilazione condizionale DISABLE_SAMPLE_DATA e disattivare i dati di esempio in fase di esecuzione.
#if DISABLE_SAMPLE_DATA
	internal class SampleDataSource { }
#else

	public class SampleDataSource : INotifyPropertyChanged
	{
		public event PropertyChangedEventHandler PropertyChanged;

		protected virtual void OnPropertyChanged(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}

		public SampleDataSource()
		{
			try
			{
				Uri resourceUri = new Uri("ms-appx:/SampleData/SampleDataSource/SampleDataSource.xaml", UriKind.RelativeOrAbsolute);
				Windows.UI.Xaml.Application.LoadComponent(this, resourceUri);
			}
			catch
			{
			}
		}

		private GroupCollection _Groups = new GroupCollection();

		public GroupCollection Groups
		{
			get
			{
				return this._Groups;
			}
		}
	}

	public class GroupCollection : System.Collections.ObjectModel.ObservableCollection<Group>
	{ 
	}

	public class Group : INotifyPropertyChanged
	{
		public event PropertyChangedEventHandler PropertyChanged;

		protected virtual void OnPropertyChanged(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}

		private ItemCollection _Items = new ItemCollection();

		public ItemCollection Items
		{
			get
			{
				return this._Items;
			}
		}

		private string _Label = string.Empty;

		public string Label
		{
			get
			{
				return this._Label;
			}

			set
			{
				if (this._Label != value)
				{
					this._Label = value;
					this.OnPropertyChanged("Label");
				}
			}
		}

		private string _Property2 = string.Empty;

		public string Property2
		{
			get
			{
				return this._Property2;
			}

			set
			{
				if (this._Property2 != value)
				{
					this._Property2 = value;
					this.OnPropertyChanged("Property2");
				}
			}
		}

		private Windows.UI.Xaml.Media.ImageSource _Property3 = null;

		public Windows.UI.Xaml.Media.ImageSource Property3
		{
			get
			{
				return this._Property3;
			}

			set
			{
				if (this._Property3 != value)
				{
					this._Property3 = value;
					this.OnPropertyChanged("Property3");
				}
			}
		}

		private string _Property4 = string.Empty;

		public string Property4
		{
			get
			{
				return this._Property4;
			}

			set
			{
				if (this._Property4 != value)
				{
					this._Property4 = value;
					this.OnPropertyChanged("Property4");
				}
			}
		}
	}

	public class ItemCollection : System.Collections.ObjectModel.ObservableCollection<Item>
	{ 
	}

	public class Item : INotifyPropertyChanged
	{
		public event PropertyChangedEventHandler PropertyChanged;

		protected virtual void OnPropertyChanged(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}

		private string _Property1 = string.Empty;

		public string Property1
		{
			get
			{
				return this._Property1;
			}

			set
			{
				if (this._Property1 != value)
				{
					this._Property1 = value;
					this.OnPropertyChanged("Property1");
				}
			}
		}

		private string _Property2 = string.Empty;

		public string Property2
		{
			get
			{
				return this._Property2;
			}

			set
			{
				if (this._Property2 != value)
				{
					this._Property2 = value;
					this.OnPropertyChanged("Property2");
				}
			}
		}

		private Windows.UI.Xaml.Media.ImageSource _Property3 = null;

		public Windows.UI.Xaml.Media.ImageSource Property3
		{
			get
			{
				return this._Property3;
			}

			set
			{
				if (this._Property3 != value)
				{
					this._Property3 = value;
					this.OnPropertyChanged("Property3");
				}
			}
		}
	}
#endif
}
